This invention relates generally to security exploits on computer systems and, more specifically, relates to application binary rewriting to reduce binary attack surface area.
A code-reuse attack on a computer system is a security exploit that reuses existing instructions in an application to execute arbitrary code on a compromised computer system. Such attacks include return-oriented programming and a variant called jump-oriented programming. In return-oriented programming, an attacker gains control of the call stack to hijack program control flow and then executes carefully chosen machine instruction sequences, called “gadgets”, that are already present in the machine's memory. Each gadget typically ends in a return instruction and is located in a subroutine within the existing program and/or shared library code. Chained together, these gadgets allow an attacker to perform arbitrary operations on a machine employing defenses that thwart simpler attacks.
Control-flow hijack is a precursor to a code-reuse attack. Control-flow hijack is a type of attack that makes use of memory corruption to redirect the flow of execution to a location controlled by an attacker. This area may contain existing instructions (thus, the code reuse, which is a focus of the exemplary embodiments described below) or instructions injected by an attacker.
These types of attacks are advanced types of attacks that can be used to circumvent modern, security checks and hardening efforts. The more instructions to which an attacker has access, the more likely the success of the attack. The term “binary attack surface area” is used to quantify the amount of instructions to which an attacker has access, and refers to the amount of code, including code in an application and any code that application can access, e.g., in libraries, APIs (application programming interfaces), and the like, that can be accessed/manipulated by an attacker to compromise a system.
It would be beneficial to reduce the binary attack surface area in order to reduce the chance of or prevent these types of attacks.